<%@ page import="java.util.Date" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="../include/tag.jsp" %>
<!DOCTYPE html>
<html lang="zh">
<head>
    <title>尾款提现</title>
    <%@include file="../include/commonFile.jsp" %>
    <link rel="stylesheet" href="${ctx}/css/common/list.css">
    <link rel="stylesheet" href="${ctx}/css/common/table.css">
</head>
<body>
<!--头部-->
<%@include file="../include/header.jsp" %>
<div class="index-outside">
    <%@include file="../include/sidebar.jsp" %>
    <!--内容-->
    <section>
        <div class="section-main">
            <form class="layui-form" action="${ctx}/moneyManagement/tailParagraph/tailParagraphList.do" id="myForm" method="post">
                <input type="hidden" name="pageNo" id="pageNo"/>
                <div class="f-search-bar">
                    <div class="search-container">
                        <ul class="search-form-content">
                            <li class="form-item-inline"><label class="search-form-lable">提现者</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="withdrawalMember" autocomplete="off" class="layui-input" value="${waoInput.withdrawalMember}" placeholder="请输入提现者">
                                </div>
                            </li>
                            <li class="form-item-inline"><label class="search-form-lable">主题名称</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="name" autocomplete="off" class="layui-input" value="${waoInput.name}" placeholder="请输入主题名称">
                                </div>
                            </li>

                            <li class="form-item-inline"><label class="search-form-lable">状态</label>
                                <div class="layui-input-inline">
                                    <select name="progress">
                                        <option value="">全部</option>
                                        <option value="1" ${waoInput.progress == 1 ? 'selected' : ''}>待处理</option>
                                        <option value="2" ${waoInput.progress == 2 ? 'selected' : ''}>待客户确认</option>
                                        <option value="3" ${waoInput.progress == 3 ? 'selected' : ''}>待打款</option>
                                        <option value="4" ${waoInput.progress == 4 ? 'selected' : ''}>已打款</option>
                                    </select>
                                </div>
                            </li>
                            <li class="form-item-inline">
                                <div class="sub-btns">
                                    <a class="layui-btn layui-btn-danger"
                                       href="javascript:submitFunction('#myForm')">查询</a>
                                    <a class="layui-btn layui-btn-normal"
                                       href="javascript:resetFunction('#myForm')">重置</a>
                                </div>
                            </li>
                        </ul>
                        <ul class="search-form-content">
                            <li class="form-item"><label class="search-form-lable">发布时间</label>
                                <div class="check-btn-inner" id="timeType">
                                    <a id="all" href="javascript:void(0);"
                                       onclick="setTimeType($(this),0,'#myForm')" ${empty input.timeType || input.timeType == 0 ? 'class="active"' : ''}>全部</a>
                                    <a href="javascript:void(0);"
                                       onclick="setTimeType($(this),1,'#myForm')" ${input.timeType == 1 ? 'class="active"' : ''}>今天</a>
                                    <a href="javascript:void(0);"
                                       onclick="setTimeType($(this),2,'#myForm')" ${input.timeType == 2 ? 'class="active"' : ''}>本周内</a>
                                    <a href="javascript:void(0);"
                                       onclick="setTimeType($(this),3,'#myForm')" ${input.timeType == 3 ? 'class="active"' : ''}>本月内</a>
                                    <input type="hidden" name="timeType" value="${input.timeType}"/>
                                </div>
                                <div class="layui-inline">
                                    <div class="layui-input-inline">
                                        <input class="layui-input" type="text" name="createStart"
                                               value="${input.createStart}" placeholder="开始日">
                                    </div>
                                    -
                                    <div class="layui-input-inline">
                                        <input class="layui-input" type="text" name="createEnd"
                                               value="${input.createEnd}" placeholder="截止日">
                                    </div>
                                </div>
                            </li>

                        </ul>
                    </div>
                </div>
            </form>
            <div class="list-content">
                <ul class="num mt10">
                    <div class="l">
                        <li class="f16">提现次数<span class="red">${page.totalCount}</span>次</li>
                    </div>
                    <p class="cl"></p>
                </ul>
                <div class="cl">
                    <table class="layui-table">
                        <colgroup>
                            <col width="20%">
                            <col>
                            <col width="15%">
                            <col width="170px">
                            <col width="10%">
                            <col width="5%">
                        </colgroup>
                        <thead>
                        <tr>
                            <th>提现者</th>
                            <th>众筹主题</th>
                            <th>应付尾款</th>
                            <th>提交时间</th>
                            <th>状态</th>
                            <th>操 作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <c:if test="${page.totalCount == 0}">
                            <tr>
                                <td colspan="6">
                                    <div class="f18 tc">还没有提现记录</div>
                                </td>
                            </tr>
                        </c:if>
                        <c:forEach var="wao" items="${list}" varStatus="st">
                            <tr>
                                <td>
                                        ${wao.withdrawalMember}
                                </td>
                                <td>
                                        ${wao.name}
                                </td>
                                <td>
                                    <fmt:formatNumber pattern="0.00" value="${wao.payment}"/>元
                                </td>
                                <td>
                                    <fmt:formatDate value="${wao.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
                                </td>
                                <td>
                                    <c:choose>
                                        <c:when test="${wao.progress == 1}">
                                            待处理
                                        </c:when>
                                        <c:when test="${wao.progress == 2}">
                                            <span class="green">待客户确认</span>
                                        </c:when>
                                        <c:when test="${wao.progress == 3}">
                                            <span style="color:red">待打款</span>
                                        </c:when>
                                        <c:when test="${wao.progress == 4}">
                                            <span style="color:blue">已打款</span>
                                        </c:when>
                                    </c:choose>
                                </td>
                                <td>
                                    <a href="${ctx}/moneyManagement/tailParagraph/tailParagraphInfo.do?businessId=${wao.businessId}&memberId=${wao.memberId}"
                                       target="_self" style="color:blue">详情</a>
                                </td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                </div>
            </div>
            <div id="page_content" class="page-container"></div>
        </div><!--底部-->
        <%@include file="../include/footer.jsp" %>
    </section>
        </div>
    </div>
</div>

<script type="text/javascript" src="${ctx}/script/common/list.js"></script>
<script type="text/javascript" src="${ctx}/script/common/table_option.js"></script>
<script type="text/javascript">
    $(function () {
//加载分页
        loadPageNew({
            elem: 'page_content',
            totalCount: '${page.totalCount}',
            limit: '${page.limit}',
            page: '${page.page}'
        });
        //加载日历
        layui.use(['laydate'], function () {
            var laydate = layui.laydate;

            // 查询开始日期
            var start = {
                elem: 'input[name=s_start]'
            };

            var end = {
                elem: 'input[name=s_end]'
            };
            laydate.render(start);
            laydate.render(end);

            // 查询发布日期
            var start = {
                elem: 'input[name=createStart]'
            };

            var end = {
                elem: 'input[name=createEnd]'
            };
            laydate.render(start);
            laydate.render(end);
        });
    })
</script>
<script type="text/javascript">
    txz.initHeader({
        nav: [{
            name: '尾款提现',
            curr: true
        }],
        info: '<span class="f12">共<b id="totalCount">${page.totalCount}</b>条记录</span>',
    });
</script>

</body>
</html>